package com.sskj.one.mine;

import com.sskj.common.base.HttpData;
import com.sskj.lib.http.JsonCallBack;
import com.sskj.one.bean.CompanyBankBean;
import com.sskj.one.presenter.BasePresenter;

import java.io.File;

/**
 * @author Hey
 * Create at  2019/06/15
 */
class DownGouhuiPresenter extends BasePresenter<DownGouhuiActivity> {

    public void getShoukuanMsg() {
        httpService.getShoukuanMsg()
                .tag(this)
                .execute(new JsonCallBack<HttpData<CompanyBankBean>>(this) {
                    @Override
                    public void onHTTPSuccess(HttpData<CompanyBankBean> data) {
                        mView.getShoukuanMsgOK(data.getData());
                    }
                });
    }

    public void gouhui(String gouHuiMOney, String tongdao, String type, String name, String alipay, String bank, String branch, String card, File img) {
        httpService.xianxiaGouhui(gouHuiMOney, tongdao, type, name, alipay, bank, branch, card, img)
                .tag(this)
                .execute(new JsonCallBack<HttpData>(this,true) {
                    @Override
                    public void onHTTPSuccess(HttpData data) {
                        mView.gouhuiOK();
                    }
                });
    }
}
